package com.corpgovernment.permission.mapper;

import com.corpgovernment.organization.common.mybatis.TkMapper;
import com.corpgovernment.permission.entity.db.MbRolePermission;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wangyujue
 */
@Repository
public interface RolePermissionMapper extends TkMapper<MbRolePermission> {

    List<MbRolePermission> listByRoleId(@Param("roleId") Long roleId);
    @Select("SELECT * FROM mb_role_permission WHERE role_id IN #{roleIds}")
    List<MbRolePermission> listByRoleIdList(@Param("roleIds")List<Long> roleIds);
}
